#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <time.h>


void pause()
{
    int continuer = 1;
    SDL_Event event;
 
    while (continuer)
    {
        SDL_WaitEvent(&event);
        switch(event.type)
        {
            case SDL_KEYDOWN:
                continuer = 0;
        }
    }
}



void afficher_naruto_avance(SDL_Surface ** Naruto,SDL_Surface *ecran ,SDL_Rect* positionNaruto){

int i, temps;

SDL_SetColorKey(Naruto[0], SDL_SRCCOLORKEY, SDL_MapRGB(Naruto[0]->format,255, 255,255));
SDL_SetColorKey(Naruto[1], SDL_SRCCOLORKEY, SDL_MapRGB(Naruto[1]->format,255, 255,255));
SDL_SetColorKey(Naruto[2], SDL_SRCCOLORKEY, SDL_MapRGB(Naruto[2]->format,255, 255,255));


    SDL_BlitSurface(Naruto[0], NULL, ecran, positionNaruto);
    SDL_Flip(ecran);
    SDL_Delay(1000);

	for(i=0;i<10;i++){
    SDL_FillRect(ecran, NULL, SDL_MapRGB(ecran->format, 0, 0, 0));
    SDL_BlitSurface(Naruto[1], NULL, ecran, positionNaruto);
    SDL_Flip(ecran);
    SDL_Delay(300);
    SDL_FillRect(ecran, NULL, SDL_MapRGB(ecran->format, 0, 0, 0));
    SDL_BlitSurface(Naruto[2], NULL, ecran, positionNaruto);
    SDL_Flip(ecran);
    SDL_Delay(300);
    
    
}

    SDL_BlitSurface(Naruto[0], NULL, ecran, positionNaruto);
   SDL_Flip(ecran);
    SDL_Delay(300);


}


